<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
  <body></body>
  <script src="./common.js"></script>
  <script>
    // 11.  请自定义一个注册事件的兼容函数，要求兼容三种注册事件方法。

    function bindEvent(ele, type, fn) {
      ele = ele || this
      if (ele.addEvenetListener) {
        ele.addEvenetListener(type, fn)
      } else if (ele.attachEvent) {
        ele.addachEvent('on' + type, fn)
      } else {
        ele['on' + type] = fn
      }
    }
  </script>
</html>
